fix(macros): stop marking existing macros as deleted in the settings - #3
Merged
Merged
Conversation
Two issues made the macros settings mark macros as deleted or break the list entirely: - `allMacros` in the expert tab was filtered by the search field, but `existsMacro()` and `getMacroDescription()` used it for existence checks. Typing in the "available macros" search therefore labelled every non-matching macro of the edited group as a deleted macro and hid its color/visibility buttons. The search filter now lives in a separate `filteredMacros` getter used only by `availableMacros`. - `searchMacros` is reset to null by the clearable prop of v-text-field, so clicking the clear icon threw on `.toLowerCase()` and broke the rendering of both settings tabs. Additionally `printer/getMacros` defaulted `configfile.settings` to null and then indexed it unconditionally, which threw when the macro objects were known but configfile was not populated yet. Signed-off-by: Åsmund Collin <aakjaergaard@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two issues made the macros settings mark macros as deleted or break the list entirely:
allMacrosin the expert tab was filtered by the search field, butexistsMacro()andgetMacroDescription()used it for existence checks. Typing in the "available macros" search therefore labelled every non-matching macro of the edited group as a deleted macro and hid its color/visibility buttons. The search filter now lives in a separatefilteredMacrosgetter used only byavailableMacros.searchMacrosis reset to null by the clearable prop of v-text-field, so clicking the clear icon threw on.toLowerCase()and broke the rendering of both settings tabs.Additionally
printer/getMacrosdefaultedconfigfile.settingsto null and then indexed it unconditionally, which threw when the macro objects were known but configfile was not populated yet.Description
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
[optional] Are there any post-deployment tasks we need to perform?